/****************************************************************
 *Author:       zxx
 *UnityVersion：2019.4.1f1
 *Date:         2020/07/30 13:20:33
 *Description:    
*****************************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class GameMananger : MonoBehaviour {

    
    public static GameMananger Instance;

    public float diamontCount { get; set; }
    public float gameOverTimer  { get; set; }

    public bool jump { get; set; }

    //public bool isStarted { get; set; }

    public bool isGameOver { get; set; }

    public bool invincible { get; set; }

    public int PlayerStatus { get; set; }

    public int isSanLian { get; set; }
    private void Awake()
    {
        Instance = this;
        PlayerStatus = 0;

        gameOverTimer = 90;

        isSanLian = PlayerPrefs.GetInt("isSanLian", 0);
    }

    private void OnDestroy()
    {
        PlayerPrefs.SetInt("isSanLian", isSanLian);
    }

    public void ReLoadScense()
    {
        SceneManager.LoadScene(SceneManager.GetActiveScene().name);
    }

    public void UpdateDiamondCount()
    {
        diamontCount++;
    }

   
}

